    #ifndef _DEFINE_H
#define _DEFINE_H
#define  BLOCKSIZE 4096
#define  BUFFERSIZE 100
#define  TABLENUMBER 1000
#define  intScale  sizeof(int)
#define  charScale  sizeof(char)
#define  boolScale  sizeof(bool)
#define  floatScale  sizeof(float)
#define  CATALOG  0
#define  INDEX	  1
#define  RECORD   2

struct address
{
	int block_number;
	int offset;
	static int getSize()
	{
		return 2*intScale;
	}
	void set(int x, int y)
	{
		block_number=x;
		offset=y;
	}
	void increase(int capacity)
	{
		if(offset<capacity-1)
			offset++;
		else
		{
			block_number++;
			offset=0;
		}

	}
	bool isValid()
	{
		return (block_number>=0&&offset>=0);
	}
};

#endif